package com.sskj.gocoin.m.bean.rxbus;

import java.io.Serializable;

/**
 * 作者 :吕志豪
 * 简书：https://www.jianshu.com/u/6e525b929aac
 * github：https://github.com/lvzhihao100
 * 描述：杠杆交易数据推送
 * 创建时间：2018-07-30 11:28
 */
public class StockLevel implements Serializable {
    String name;//币种名字
    double price;//当前价格
    String code;//币种代码
    double leverage;//杠杆
    double shouPer;//每手手续费
    double minDealNum;//最少交易数量
    double slidingScalePrice;//最小浮动价格
    double spread;//点差
    float stopProfit;//最大止盈
    float stopLoss;//最大止损
    float minStopProfit;//最小止盈
    float minStopLoss;//最小止损


    public int getMinStopProfit() {
        return Float.valueOf(minStopProfit).intValue();
    }

    public void setMinStopProfit(float minStopProfit) {
        this.minStopProfit = minStopProfit;
    }

    public int getMinStopLoss() {
        return Float.valueOf(minStopLoss).intValue();
    }

    public void setMinStopLoss(float minStopLoss) {
        this.minStopLoss = minStopLoss;
    }

    public int getStopProfit() {
        return Float.valueOf(stopProfit).intValue();
    }

    public void setStopProfit(float stopProfit) {
        this.stopProfit = stopProfit;
    }

    public int getStopLoss() {
        return Float.valueOf(stopLoss).intValue();
    }

    public void setStopLoss(float stopLoss) {
        this.stopLoss = stopLoss;
    }

    public String getName() {
        return name;
    }

    public StockLevel setName(String name) {
        this.name = name;
        return this;
    }

    public double getPrice() {
        return price;
    }

    public StockLevel setPrice(double price) {
        this.price = price;
        return this;
    }

    public String getCode() {
        return code;
    }

    public StockLevel setCode(String code) {
        this.code = code;
        return this;
    }

    public double getLeverage() {
        return leverage == 0 ? 1 : leverage;
    }

    public StockLevel setLeverage(double leverage) {
        this.leverage = leverage;
        return this;
    }

    public double getShouPer() {
        return shouPer;
    }

    public StockLevel setShouPer(double shouPer) {
        this.shouPer = shouPer;
        return this;
    }

    public double getMinDealNum() {
        return minDealNum;
    }

    public StockLevel setMinDealNum(double minDealNum) {
        this.minDealNum = minDealNum;
        return this;
    }

    public double getSlidingScalePrice() {
        return slidingScalePrice;
    }

    public StockLevel setSlidingScalePrice(double slidingScalePrice) {
        this.slidingScalePrice = slidingScalePrice;
        return this;
    }

    public double getSpread() {
        return spread;
    }

    public StockLevel setSpread(double spread) {
        this.spread = spread;
        return this;
    }
}
